Przykłady - układ współrzędnych

p + coord_polar(theta="x")

plot of chunk unnamed-chunk-32

Przykłady - układ współrzędnych

require(maps)
d = data.frame(map(database="italy", plot=F)[c("x", "y")])
ggplot() + coord_map() +
geom_polygon(data=d, mapping=aes(x=x, y=y), fill="red", color="black", size=0.2)

plot of chunk unnamed-chunk-33

Palety kolorów

p <- ggplot(
 data=mpg,
 aes(x=displ,
   y=hwy,
   fill=factor(cyl))
 ) +
 geom_bar(
   stat="identity",
   position=
       "identity")
p

plot of chunk unnamed-chunk-35

Palety kolorów

ColorBrewer

p + scale_fill_brewer()

plot of chunk unnamed-chunk-37

Palety kolorów

ColorBrewer

p + scale_fill_brewer(
  palette="Set1")

plot of chunk unnamed-chunk-39

Palety kolorów

ColorBrewer

p + scale_fill_brewer(
  palette="Spectral")

plot of chunk unnamed-chunk-41

Palety kolorów

Ręcznie definiowane

p +
scale_fill_manual(
  values=
      c("red",
        "blue",
        "green",
        "orange"))

plot of chunk unnamed-chunk-43